#ifndef XBELMODEL_H
#define XBELMODEL_H

#include <QtGui>

class XbelModel : public QStandardItemModel
{
    Q_OBJECT

public:
    XbelModel(QObject *parent = 0);
    bool read(QFile *file);
    void readXbelElement();
    void readFolderElement(QStandardItem *parent);
    void skipUnknownElement();
    void load();
    bool write(QFile *file);
    void writeFolderElement(QXmlStreamWriter *xmlWriter, QStandardItem *root, QStandardItem *root1,QStandardItem *root2,QStandardItem *root3,QStandardItem *root4);
    void createItem(QStandardItem *parent);
    bool slot_new(QFile *file_new);
    bool slot_insertItem(bool child);
    bool slot_deleteItem(QStandardItem *item, int row);
    void initialize();
    bool slot_raschet();
    void ras_init(QStandardItem *item);
    void ras_func(QStandardItem *item,QStandardItem *item1);
    void slot_ras_number(QStandardItem *item,QStandardItem *item3);

private:
    QXmlStreamReader reader;
};

#endif // XBELMODEL_H
